//
//  CellForWHTStoryFiveModel.m
//  WZLProduct
//
//  Created by dllo on 16/3/28.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "CellForWHTStoryFiveModel.h"

@implementation CellForWHTStoryFiveModel

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = [UIColor yellowColor];
        
        self.userImgButton = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.userImgButton setImage:[[UIImage imageNamed:@"refreshingImages"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
        self.userImgButton.backgroundColor = [UIColor redColor];
        self.userImgButton.layer.masksToBounds = YES;
        self.userImgButton.layer.cornerRadius = 15;
        [self.contentView addSubview:self.userImgButton];
        [self.userImgButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.equalTo(self.contentView).with.offset(10);
            make.size.mas_equalTo(30);
        }];
        
        self.userNameAndComment = [[UILabel alloc] init];
        [self.contentView addSubview:self.userNameAndComment];
        self.userNameAndComment.text = @"name  Comment........";
        self.userNameAndComment.textColor = [UIColor lightGrayColor];
        self.userNameAndComment.backgroundColor = [UIColor orangeColor];
        self.userNameAndComment.font = FONT13;
        [self.userNameAndComment mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.userImgButton);
            make.left.equalTo(self.userImgButton.mas_right).with.offset(5);
            make.right.equalTo(self.contentView).with.offset(-10);
            make.height.mas_equalTo(30);
        }];
        
        self.date_added = [[UILabel alloc] init];
        [self.contentView addSubview:self.date_added];
        self.date_added.text = @"2016-03-00 00:00";
        self.date_added.textColor = [UIColor lightGrayColor];
        self.date_added.backgroundColor = [UIColor yellowColor];
        self.date_added.font = FONT10;
        [self.date_added mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(self.userNameAndComment);
            make.top.equalTo(self.userNameAndComment.mas_bottom);
            make.height.mas_equalTo(20);
        }];
        
        
        
    }
    return self;
}

@end
